#include <iostream>
#include <memory>
#include <thread>
#include "./transaction/Transaction.h"

class Group {
    public:
        Group(std::vector<Transaction>& producerPool, std::vector<Transaction>& consumerPool);
        ~Group();
        void groupRunable();
        void takeTransactionFromProducerPool();
        void putTransactionToConsumerPool();

    private:
        // single thread for its own operations
        std::thread thread;
        // reference to the producer pool
        std::vector<Transaction>& producerPool;
        // reference to the consumer pool
        std::vector<Transaction>& consumerPool;
};